<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> 
<META HTTP-EQUIV="Expires" CONTENT="-1">
<meta name="robots" content="noindex">
<script type="text/javascript" src="/js/functions.js"></script>
<script type="text/javascript" src="/js/editor/tiny_mce.js"></script>
<script type="text/javascript">var _show_editor=true;</script><style type="text/css" media="all">@import "/css/global.css";</style>
<title>All Leadership Picks</title><link rel="stylesheet" type="text/css" href="/css/coreBlue.css">
<link rel="stylesheet" type="text/css" href="/css/defaultThemeNew.css?OpenPage">
<link rel="stylesheet" type="text/css" href="/css/iehacks1.css">
<link rel="stylesheet" type="text/css" href="/css/blog.css">
<link rel="stylesheet" type="text/css" href="/css/celestica_microsite.css">
<link rel="stylesheet" type="text/css" href="/css/nyroModal.css">
<link rel="stylesheet" type="text/css" href="/css/busCard.css">

<script language="JavaScript" type="text/javascript">
<!-- 
// GLOBAL VARIABLES
var checkCookie = true;
var totalDocs = "";
var startDoc = 0;
var docsPerPage = 0;
var totalPages = 0;
var navRange = 0;
var navCache = 0;
var navDiv1 = "";
var navDiv2 = "";

var req;
function processReqChange_lookup()
{  

    if (req.readyState == 4)             
 /*Only process if XML file is loaded completely:4="Complete" */
  {

         if (req.status == 200)           
 /*Only process if everything is ok*/
	    	{ 

xmlstr=req.responseText
populatelookup(xmlstr)
		        } 
   	 else 
  	 {
		alert("There was a problem retrieving the XML data:n" + req.statusText);
     	     }
     	     
     	  }
		}
		
function populatelookup(xmlstr)
{
document.getElementById("BestofRegions").innerHTML=xmlstr

$("#insured_list_Americas").tablesorter({widthFixed: true, widgets: ['zebra']});
$("#insured_list_China").tablesorter({widthFixed: true, widgets: ['zebra']});
$("#insured_list_South-East Asia").tablesorter({widthFixed: true, widgets: ['zebra']});
$("#insured_list_Pacific Rim").tablesorter({widthFixed: true, widgets: ['zebra']});
$("#insured_list_Europe").tablesorter({widthFixed: true, widgets: ['zebra']});

 //alert("dfdfg")
//$("#insured_list1")	.tablesorter({widthFixed: true, widgets: ['zebra']});
 
}


// 	WE ORDER THE FUNCTIONS BY ORDER OF CALLING...
function initViewNav(range, cache, div1, div2) {
	navRange = range;
	navCache = cache;
	navDiv1 = div1;
	navDiv2 = div2;
	startDoc = queryString('start');
	startDoc = (startDoc == "") ? 1 : parseInt(startDoc);
	docsPerPage = queryString('count');
	docsPerPage = (docsPerPage == "") ? varCount : parseInt(docsPerPage);	
	waitForDocCount();
}

function queryString(key){
	var page = new PageQuery(window.location.search); 
	return unescape(page.getValue(key.toLowerCase())); 
}

function PageQuery(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
		else this.q = null;
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i].toLowerCase();
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {
		for(var j=0; j < this.keyValuePairs.length; j++) {
			if(this.keyValuePairs[j].split("=")[0] == s)
			return this.keyValuePairs[j].split("=")[1];
		}
		return "";
	}
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
		return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; } 
}

function waitForDocCount() {
	if (checkCookie) {
		totalDocs = getCookie('totaldocs');
		checkCookie = false;
	}	
	if (totalDocs == "") {		
		getDocCount();
		setTimeout("waitForDocCount()", 10);
	} else {
		drawViewNav();
	}
}

function getCookie(cookiename) {
	var cookiestring = "" + document.cookie;
	var index1 = cookiestring.indexOf(cookiename);
	if (index1 == -1 || cookiename == "") return ""; 
		var index2 = cookiestring.indexOf(';', index1);
	if (index2 == -1) index2 = cookiestring.length; 
		return unescape(cookiestring.substring(index1 + cookiename.length + 1, index2));
}

function getDocCount () {
	ajax_Request();		
}

function ajax_Request() {
	var url = dbPath + viewAlias + "?ReadViewEntries&Count=0";
	
	var myRequest = new Ajax.Request(url, {
		method: 'get', 
		onSuccess: function (transport){
			var resp = transport.responseText;
			var countTag = resp.toLowerCase().indexOf('toplevelentries');
			if (countTag > 0) {
				resp = resp.substr(resp.indexOf('"', countTag) + 1);
				totalDocs = resp.substring(0, resp.indexOf('"'));
				setCookie('totaldocs', totalDocs, navCache)
			}
		}
	});
}

function setCookie(name, value, duration){
	cookiestring = name + "=" + escape(value) + "; EXPIRES=" + getExpiryDate(duration);
	document.cookie = cookiestring;
}	
function getExpiryDate(minutes){
	var UTCstring;
	Today = new Date();
	nomilli = Date.parse(Today);
	Today.setTime(nomilli + (minutes * 60000));
	UTCstring = Today.toUTCString();
	return UTCstring;
}

function drawViewNav() {
	partialPages = totalDocs / docsPerPage;
	extraPage = (partialPages == Math.floor(partialPages)) ? 0 : 1;
	totalPages = Math.floor(partialPages) + extraPage;
	curPage = Math.floor(startDoc / docsPerPage) + 1
	startLink = (curPage < (navRange + 1)) ? 1 : curPage - navRange;
	endLink = ((curPage + navRange) > totalPages) ? totalPages : curPage + navRange;
	// START WRITING THE NAVIGATION
	navHTML = ""
	navHTML += "<div class='nav' align='center'>"
	navHTML +="<table class='navtable' cellpadding='0' cellspacing='0'>"
	navHTML +="<tr>";
	// WRITE: FIRST, JUMP AND PREVIOUS LINKS
	if (startLink > 1) {
		navHTML += buildLink(1, "First");
		navHTML += buildLink(curPage - (navRange + 1), "&lt;&lt;");
	}	
	if (curPage > 1) navHTML += buildLink(curPage - 1, "&lt;");
	// WRITE ALL THE PAGINATION
	for (i = startLink; i <= endLink; i++) {
		if (i == curPage) {
			navHTML += "<td class='navtablecur'>" + i + "</td>"
		} else {
			navHTML += buildLink(i, i);
		}
	}
	// WRITE END, NEXT AND JUMP LINKS
	if (curPage < totalPages) navHTML += buildLink(curPage + 1, "&gt;");
	if (endLink < totalPages) {
		navHTML += buildLink(curPage + (navRange + 1), "&gt;&gt;");
		navHTML += buildLink(totalPages, "Last");
	}
	// CLOSING THE LIST OF PAGE LINKS
	navHTML += "</td>"
	// WRITE PAGE X OF Y TEXT AND ADD AN INPUT BOX
	navHTML += "<td class='navpages'>Page ";
	navHTML += "<input title=\"Click to enter a new page number here\" onKeyUp=\"void(getPage(event, this))\" ";
	navHTML += "onClick='this.select()' onFocus='this.select()' type='text' style='margin-top:-3px;color:gray;font-size:7pt;' value='" + curPage + "' />";
	navHTML += " of " + totalPages + "</td>";
	
	// CLOSE THE NAVIGATION
	navHTML += "</tr>"
	navHTML += "</table>";	
	navHTML += "</div>"
	// WRITE THE NAVIGATION TO THE PAGE ELEMENTS
	if (typeof navDiv1 != "undefined") $(navDiv1).innerHTML = navHTML;
	if (typeof navDiv2 != "undefined") $(navDiv2).innerHTML = navHTML;	
	
		//document.getElementById('view').style.display = 'block';
	new Effect.SlideDown(view);
}

function buildLink(pageNum, text) {
	startLinkDoc = (((pageNum - 1) * docsPerPage) + 1);
	endDoc = (pageNum == totalPages) ? totalDocs : startLinkDoc + docsPerPage  // Check for last page when creating tooltip range
	linkHTML = "<td class='navtablelink' onmouseover=\"this.className='navtablelink_on'\" onmouseout=\"this.className='navtablelink'\" "
	linkHTML = linkHTML + "title='Page " + pageNum + " : Documents " + startLinkDoc + " through " + endDoc + "' ";
	linkHTML = linkHTML + "onclick=document.location.href='" + viewAlias + "?OpenView" + viewQuery + "&Start=" + startLinkDoc + "&Count=" + docsPerPage + "'>" + text + "</td>";
	return linkHTML;
}

function getPage(event, field) {
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (keyCode == 13) {
		newPage = field.value;
		if (newPage > totalPages || newPage < 1) {
			field.select();
			return false;
		}
		document.location.href = dbPath + viewAlias + "?OpenView" + viewQuery + "&start=" + (((newPage - 1) * docsPerPage) + 1) + "&count=" + docsPerPage
	}
}
/***************************************************************************************************************************/

function view_replace_nodocuments(vMessage){
	var h2 = $$('h2');
  	for (var vLoop = 0; vLoop < h2.length; vLoop++){
   		if (h2[vLoop].childNodes[0].nodeValue == "No documents found"){
    			h2[vLoop].childNodes[0].nodeValue = vMessage;
   		}
   		h2[vLoop].style.visibility = 'visible';
  	}
}


// Wrapper function to get a cross browser XMLHttp object
/***************************************************************************************************************************/
/*
function getXMLHTTP() {
	// function to create an XmlHttp object
	var xmlHttp = null;
	try {
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		try {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(oc) {
			xmlHttp = null;
		}
	}
	if(!xmlHttp && typeof XMLHttpRequest != "undefined") {
		xmlHttp = new XMLHttpRequest();
	}
	return xmlHttp;
}
*/
function catRegion()
{

temp=document.getElementById("cmbRegionalList")
valSelected=temp.options[temp.selectedIndex].text

		document.location.href = dbPath + "(ViewbySolRegion)" + "?OpenView&start=1&count=5&restricttocategory="+ valSelected

}

function getMonthNoms() {
var selMon = document.forms[0].cmbMonth[document.forms[0].cmbMonth.selectedIndex].text;

//alert(selMon)
document.location.href = "/global/collaboration/SavvySol.nsf/frmAllLeadPics?OpenForm&"+selMon

}
function getPosition(arrayName,arrayItem)
{
    for(var i=0;i<arrayName.length;i++){ 
       if(arrayName[i]==arrayItem)
            return i;
    }
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
document._domino_target = "_self";
function _doClick(v, o, t, h) {
  var form = document._frmAllLeadPics;
  if (form.onsubmit) {
     var retVal = form.onsubmit();
     if (typeof retVal == "boolean" && retVal == false)
       return false;
  }
  var target = document._domino_target;
  if (o.href != null) {
    if (o.target != null)
       target = o.target;
  } else {
    if (t != null)
      target = t;
  }
  form.target = target;
  form.__Click.value = v;
  if (h != null)
    form.action += h;
  form.submit();
  return false;
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function clear1()
{
document.forms[0].SearchQuery1.value=""

}

function copydata()
{

document.forms[0].SearchQuery.value=document.forms[0].SearchQuery1.value
}

// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function soonLaunch()
{
alert("This exciting new tool is soon to come to Operations Central!")
}

function DoNothing()
{

}

// -->
</script>



